package com.project.communitymanagement.controller;

import com.project.communitymanagement.common.BaseController;
import com.project.communitymanagement.common.ResponseEntity;
import com.project.communitymanagement.entity.TbSalaryStructure;
import com.project.communitymanagement.service.TbSalaryStructureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("tbsalarystructure")
public class TbSalaryStructureController extends BaseController<TbSalaryStructureService, TbSalaryStructure> {

    @Autowired
    private TbSalaryStructureService tbsalarystructureService;

    @Override
    protected TbSalaryStructureService service() {
        return tbsalarystructureService;
    }

    @GetMapping("getAll")
    public ResponseEntity<List<TbSalaryStructure>> getAll(){
        return ResponseEntity.success(tbsalarystructureService.getAll());
    }

}
